From 4017a55c9f9f96068f169e673afd92d40646b3cf Mon Sep 17 00:00:00 2001 From: robertl Date: Sun, 2 Jul 2006 17:30:21 +0000 Subject: [PATCH] Make maggeo choke if > 200 waypoints since Magellan's firmware lets more just fall on the floor. --- gpsbabel/maggeo.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gpsbabel/maggeo.c b/gpsbabel/maggeo.c index 6c5f9c288..21263e330 100644 --- a/gpsbabel/maggeo.c +++ b/gpsbabel/maggeo.c @@ -1,7 +1,7 @@ /* Magellan ".gs" files as they appear on USB of Explorist 400,500,600. - Copyright (C) 2005, robertlipe@usa.net + Copyright (C) 2005, 2006 robertlipe@usa.net This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -55,6 +55,9 @@ maggeo_rd_deinit(void) static void maggeo_wr_init(const char *fname) { + if (waypt_count() >= 200) { + fatal(MYNAME ": Magellan firmware does not support more than 200 waypoints in one .gs file.\n"); + } maggeofile_out = xfopen(fname, "wb", MYNAME); desc_handle = mkshort_new_handle(); setshort_length(desc_handle, 20); @@ -72,7 +75,7 @@ maggeo_wr_deinit(void) static void maggeo_read(void) { - fatal("Reading maggeo is not implemented yet.\n"); + fatal(MYNAME ": Reading maggeo is not implemented yet.\n"); } /* -- 2.30.2